package controller

import (
	"workflow/service"

	"github.com/gin-gonic/gin"
)

func ShowDetailController(c *gin.Context) {
	historyID, ok := c.GetQuery("id")

	if !ok {
		panic(ok)
	}

	detail, err := service.FindHistoryDetail(historyID)

	if err != nil {
		SendError(c, err)
		return
	}

	SendData(c, detail)
}
